<?php
class Model_Admin_Session
    extends Model_Core_Session_Abstract
{
    protected $_nameSpace = 'admin_user';

    public function isUserLoginedIn()
    {
        if($this->getData('user')) {
            if($this->getData('user')->getId()) {
                return true;
            }
        }

        return false;
    }

    public function setUserLoginedIn(Model_Admin_User_Admin $user)
    {
        if($user->getId()) {
            $this->setData('user',$user);
        } else {
            return false;
        }
        return true;
    }

    public function logoutUser()
    {
        $this->setData('user');
    }
}